using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Package
{
    /// <summary>
    /// <para>Package Layer</para>
    /// <para>Packages one or more layers and all referenced data sources to create a single compressed .lpkx file.</para>
    /// <para>打包一个或多个图层和所有引用的数据源以创建单个压缩的 .lpkx 文件。</para>
    /// </summary>    
    [DisplayName("Package Layer")]
    public class PackageLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PackageLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_layer">
        /// <para>Input Layer</para>
        /// <para>The layers to package.</para>
        /// <para>要打包的图层。</para>
        /// </param>
        /// <param name="_output_file">
        /// <para>Output File</para>
        /// <para>The location and name of the output package file (.lpkx) to create.</para>
        /// <para>要创建的输出包文件 （.lpkx） 的位置和名称。</para>
        /// </param>
        public PackageLayer(List<object> _in_layer, object _output_file)
        {
            this._in_layer = _in_layer;
            this._output_file = _output_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Package Layer";

        public override string CallName => "management.PackageLayer";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_layer, _output_file, _convert_data.GetGPValue(), _convert_arcsde_data.GetGPValue(), _extent, _apply_extent_to_arcsde.GetGPValue(), _schema_only.GetGPValue(), _version, _additional_files, _summary, _tags, _select_related_rows.GetGPValue()];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para>The layers to package.</para>
        /// <para>要打包的图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_layer { get; set; }


        /// <summary>
        /// <para>Output File</para>
        /// <para>The location and name of the output package file (.lpkx) to create.</para>
        /// <para>要创建的输出包文件 （.lpkx） 的位置和名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_file { get; set; }


        /// <summary>
        /// <para>Convert data to file geodatabase</para>
        /// <para><xdoc>
        ///   <para>Specifies whether input layers will be converted to a file geodatabase or preserved in their original format.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—All data will be converted to a file geodatabase. This option does not apply to enterprise geodatabase data sources. To include enterprise geodatabase data, check the Include Enterprise geodatabase data instead of referencing the data parameter.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Data formats will be preserved when possible. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将输入图层转换为文件地理数据库还是以原始格式保留输入图层。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 所有数据都将转换为文件地理数据库。此选项不适用于企业级地理数据库数据源。要包含企业级地理数据库数据，请选中包括企业级地理数据库数据，而不是引用数据参数。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将尽可能保留数据格式。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert data to file geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _convert_data_value _convert_data { get; set; } = _convert_data_value._false;

        public enum _convert_data_value
        {
            /// <summary>
            /// <para>CONVERT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CONVERT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PRESERVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Include Enterprise Geodatabase data instead of referencing the data</para>
        /// <para><xdoc>
        ///   <para>Specifies whether input enterprise geodatabase layers will be converted to a file geodatabase or preserved in their original format.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—All enterprise geodatabase data sources will be converted to a file geodatabase. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—All enterprise geodatabase data sources will be preserved and will be referenced in the resulting package.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将输入企业级地理数据库图层转换为文件地理数据库还是以原始格式保留。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 所有企业级地理数据库数据源都将转换为文件地理数据库。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将保留所有企业级地理数据库数据源，并将在生成的包中引用。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Enterprise Geodatabase data instead of referencing the data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _convert_arcsde_data_value _convert_arcsde_data { get; set; } = _convert_arcsde_data_value._true;

        public enum _convert_arcsde_data_value
        {
            /// <summary>
            /// <para>CONVERT_ARCSDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CONVERT_ARCSDE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PRESERVE_ARCSDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_ARCSDE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Extent</para>
        /// <para><xdoc>
        ///   <para>Specifies the extent that will be used to select or clip features.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于选择或裁剪要素的范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Apply Extent only to enterprise geodatabase layers</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the specified extent will be applied to all layers or only to enterprise geodatabase layers.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The extent will be applied to all layers. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The extent will be applied to enterprise geodatabase layers only.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定指定的范围是应用于所有图层还是仅应用于企业级地理数据库图层。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 范围将应用于所有图层。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 范围将仅应用于企业级地理数据库图层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Apply Extent only to enterprise geodatabase layers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _apply_extent_to_arcsde_value _apply_extent_to_arcsde { get; set; } = _apply_extent_to_arcsde_value._false;

        public enum _apply_extent_to_arcsde_value
        {
            /// <summary>
            /// <para>ARCSDE_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ARCSDE_ONLY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ALL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Schema only</para>
        /// <para><xdoc>
        ///   <para>Specifies whether only the schema of the input layers will be consolidated or packaged.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—All features and records for input layers will be included in the consolidated folder or package. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Only the schema of the layers will be consolidated or packaged. No features or records will be consolidated or packaged in the output folder.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是仅合并还是打包输入图层的方案。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—输入图层的所有要素和记录都将包含在合并文件夹或包中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 仅合并或打包图层的方案。输出文件夹中不会合并或打包任何要素或记录。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Schema only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _schema_only_value _schema_only { get; set; } = _schema_only_value._false;

        public enum _schema_only_value
        {
            /// <summary>
            /// <para>SCHEMA_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SCHEMA_ONLY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ALL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Package version</para>
        /// <para><xdoc>
        ///   <para>Specifies the version of the geodatabases that will be created in the resulting package. Specifying a version allows packages to be shared with previous versions of ArcGIS and supports backward compatibility.
        ///   <para>A package saved to a previous version may lose properties available only in the newer version.</para>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>All versions— The package will contain a geodatabase and layer file compatible with all versions (ArcGIS Pro 1.2 and later).</bullet_item><para/>
        ///     <bullet_item>Current version— The package will contain a geodatabase and layer file compatible with the version of the current release.</bullet_item><para/>
        ///     <bullet_item>2.x—The package will contain a geodatabase and layer file compatible with version 2.0 and later.</bullet_item><para/>
        ///     <bullet_item>1.2—The package will contain a geodatabase and layer file compatible with version 1.2 and later.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定将在生成的包中创建的地理数据库的版本。指定版本允许与先前版本的 ArcGIS 共享包，并支持向后兼容性。
        ///   <para>保存到早期版本的包可能会丢失仅在较新版本中可用的属性。</para>
        ///   </para>
        ///   <bulletList>
        ///     <bullet_item>所有版本 - 该包将包含与所有版本（ArcGIS Pro 1.2 及更高版本）兼容的地理数据库和图层文件。</bullet_item><para/>
        ///     <bullet_item>当前版本 - 该包将包含与当前版本版本兼容的地理数据库和图层文件。</bullet_item><para/>
        ///     <bullet_item>2.x - 包中将包含与 2.0 及更高版本兼容的地理数据库和图层文件。</bullet_item><para/>
        ///     <bullet_item>1.2 - 包中将包含与 1.2 及更高版本兼容的地理数据库和图层文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Package version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _version { get; set; } = null;


        /// <summary>
        /// <para>Additional Files</para>
        /// <para>Adds additional files to a package. Additional files, such as .doc, .txt, .pdf, and so on, are used to provide more information about the contents and purpose of the package.</para>
        /// <para>将其他文件添加到包中。其他文件（如 .doc、.txt、.pdf 等）用于提供有关包的内容和用途的详细信息。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Additional Files")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _additional_files { get; set; } = null;


        /// <summary>
        /// <para>Summary</para>
        /// <para>Adds summary information to the properties of the package.</para>
        /// <para>将摘要信息添加到包的属性中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary { get; set; } = null;


        /// <summary>
        /// <para>Tags</para>
        /// <para>Adds tag information to the properties of the package. Multiple tags can be added or separated by a comma or semicolon.</para>
        /// <para>将标记信息添加到包的属性中。可以添加多个标签，也可以用逗号或分号分隔。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tags")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tags { get; set; } = null;


        /// <summary>
        /// <para>Keep only the rows which are related to features within the extent</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the specified extent will be applied to related data sources.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Related data sources will be consolidated in their entirety. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Only related data corresponding to records within the specified extent will be consolidated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将指定的范围应用于相关数据源。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 相关数据源将全部合并。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 仅合并与指定范围内的记录对应的相关数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Keep only the rows which are related to features within the extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _select_related_rows_value _select_related_rows { get; set; } = _select_related_rows_value._false;

        public enum _select_related_rows_value
        {
            /// <summary>
            /// <para>KEEP_ONLY_RELATED_ROWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_ONLY_RELATED_ROWS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_ALL_RELATED_ROWS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_ALL_RELATED_ROWS")]
            [GPEnumValue("false")]
            _false,

        }

        public PackageLayer SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}